<?php 
if(!defined('IN_OPEN')) exit('no access');
if(!defined('OPEN_ROOT')) define('OPEN_ROOT',dirname(dirname(dirname(__FILE__))));
require_ONCE OPEN_ROOT.'/lib/class/apiservice.class.php';
/**
 * 天涯内部接口类
 */
class typort 
{
	public function __construct()
	{
		$this->t = new apiService();
	}
	public function getfollow($tyid)
	{
		$baseurl = 'http://my.tianya.cn/interface/recommend/follow.jsp?act=getfollowIpage';
		$param['id'] = intval($tyid);
		$result = $this->t->request($baseurl,$param);
		$result = json_decode($result,true);
		if($result['result']!==1)
		{
			$data = array('result'=>-1,
						  'data'=>false,
						  'msg'=>'request interface error');	
		}
		else 
		{
			$data = array('result'=>1,
						  'data'=>$result['data']['user'],
						  'msg'=>'success');	
		}
		return $data;
	}
}
?>